package test.demo.demo_client;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConfigController {

	
	@Value("${redis.host}")
	private String host;
	@Value("${redis.port}")
	private String port;

	@Autowired
	private RedisConfig redisConfig;
	
	@RequestMapping("/redis")
	public String redis() {
		return host + " : " + port;
	}
	
	@RequestMapping("/get-redis")
	public String getRedis() {
		return redisConfig.getHost() + " : " + redisConfig.getPort();
	}
}
